#
#	sniffTouchTarget.sh
#
#	SNiFF+ V3.0
#
#	Copyright (C) 1998 TakeFive Software GmbH
#	Salzburg, Austria (e-mail: sniff@TakeFive.co.at)
#
#	Author: Michael Scharf
#
#	Shell script to touch the target
#
#	Usage: 
#	 sniffTouchTarget.sh  target  command  ...
#

if [ "$3" = "" ]
    then
    echo ""
	echo "Usage: `basename $0`  target  command  DEBUG"
	echo ""
	echo " target            target                           e.g: sniff"
	echo " command           command to make target           e.g: link sniff ..."
	echo " DEBUG             debug flag                            1=true 0=false"
    exit 1
fi

TARGET=$1

target=`basename $TARGET`
if [ -h $target ] 
	then
	echo "make: copy_shared_file_to $target"
	mv $target $target.lnk
	cp $target.lnk $target
	rm -f $target.lnk
else
	if [ -f $target ] 
	then
		echo "make: touch $target"
		touch $target
	else
		echo "make: cannot touch $target. File is missing!"
		exit 1
	fi
		
fi

